<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <h1>Data里面的日期{{data_date}}</h1>
        <h1>计算属性里面的日期{{computed_date}}</h1>
        <h1>{{new_date_func()}}</h1>
        <h1>{{reversedMessage}}</h1>
        <button @click="changeMessage">改变消息</button>
    </div>
</body>
<script src="../js/vue.js"></script>
<script>
    let vm=new Vue({
        el:"#app",
        data:{
            data_date:Date.now(),
            message:"Hello",
            new_date_func:function(){
                return Date.now()
            }
        },
        computed:{
            computed_date:function(){
                return Date.now()
            },
            reversedMessage:function(){
                return this.message.split("").reverse().join("")
            }
        },
        methods:{
            changeMessage:function(){
                this.message="bu hello"
            }
        }
    })
</script>
</html>